<?php
function __autoload( $className )
{
    if ( substr( $className, 0, 6 ) == 'weebUI' )
    {
        if ( substr( $className, -9 ) == 'Exception' )
        {
            $path = 'exceptions/' . substr( $className, 6, -9 ) . '.php';
        }
        else
        {
            $path = 'classes/' . substr( $className, 6 ) . '.php';
        }
        if ( !file_exists( $path ) )
            echo "Include file not found: $path (class: $className)";
        else
            include $path;
    }
}
?>